package com.tboss.template.system.dao;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import com.tboss.template.system.dto.GroupDto;
import com.tboss.template.system.dto.MapUsrGrpDto;
import com.tboss.global.helpers.sqlSession.SqlSessionSupport;

@Repository
public class MappingUserInfoGroupDao extends SqlSessionSupport {

	@Autowired
	public MappingUserInfoGroupDao(@Qualifier("sqlSession") SqlSession sqlSession){
		super(sqlSession);
	}
	
	@Override
	public String getNameSpace() {
		// TODO Auto-generated method stub
		return "mappingUsrInfoGrp";
	}
	
	public Integer checkGrpChgChkField(String usrId){
		return super.queryForObject("checkGrpChgChkField", usrId);
	}
	
	public List<GroupDto> getUsrGrpList(String usrId){
		return super.queryForList("usrGrpList", usrId);
	}
	
	public List<GroupDto> getUsrInfoGrpList(String usrId){
		return super.queryForList("usrInfoGrpList", usrId);
	}
	
	public void delMapUsrInfoGrp(String usrId){
		super.queryForObject("delMapUsrInfoGrp", usrId);
	}
	
	public void addMapUsrInfoGrp(MapUsrGrpDto dto){
		super.queryForObject("addMapUsrInfoGrp", dto);
	}
	
}
